package com.vfmall.mapper;

import com.vfmall.annotation.AutoFill;
import com.vfmall.dto.CategoryDTO;
import com.vfmall.dto.CategoryPageQueryDTO;
import com.vfmall.entity.Category;
import com.github.pagehelper.Page;
import com.vfmall.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CategoryMapper {


    List<Category> list(Integer type);

    Page<Category> pageQuery(CategoryPageQueryDTO categoryPageQueryDTO);

    @AutoFill(value= OperationType.INSERT)
    void save(Category category );

    @AutoFill(value= OperationType.UPDATE)
    void update(Category category);

    void deleteById(Long id);
}
